<template>
	<view class="orders_list">
		<view class="orders_item" v-for="item in orders" :key="item.id">
			<view class="top">
				<text>订单编号: {{item.order_sn}}</text>
				<text>{{item.status_name}}</text>
			</view>

			<view class="center">
				<text>{{item.order_name}}</text>
				<text>会员: {{item.user_name}}</text>
				<text>原价: {{item.total_money}}元</text>
				<text>实付: {{item.money}}元</text>
			</view>
			<view class="line"></view>
			<view class="bottom">
				<text>{{item.created_at}}</text>
			</view>
		</view>

	</view>
</template>

<script>
	export default {

		props: ['orders'], //接收外界传递的数据

		methods: {
			// navigatorTo(id){
			//  this.$emit("ordersItemClick",id)
			// }
		}
	}
</script>

<style lang="scss">
	.orders_list {

		.orders_item {

			.top {
				background: #F1F7FF;
				display: flex;
				flex-direction: row;
				justify-content: space-between;
				padding: 10rpx 30rpx;
				line-height: 70rpx;
			}

			.center {
				background: #FFFFFF;
				display: flex;
				flex-direction: column;
				padding: 0 30rpx;
				line-height: 70rpx;
				font-size: 14px;

				text:nth-child(1) {
					color: #3280F5;
				}

				text:nth-child(4) {
					color: #3280F5;
				}
			}

			.line {
				width: 690rpx;
				height: 1rpx;
				margin: 0 30rpx;
				background: #DCDCDC;


			}

			.bottom {
				background: white;
				text-align: right;
				padding-right: 30rpx;
				line-height: 60rpx;
				font-size: 12px;
			}

		}

	}
</style>